import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 缺料明细查询
export const queryShortPart = params => axios.get(`${SERVER.DMSCLOUD_PART}/absentDetail/queryShortPart`, {
  params
});
// 保存
export const saveShortPart = params => axios.put(`${SERVER.DMSCLOUD_PART}/absentDetail/save`, params);

// 新增备件缺料明细
export const addNewIndebtPartDetail = params => axios.put(`${SERVER.DMSCLOUD_PART}/absentDetail/add`, params);

// 查询编辑数据
export const queryEditDataBySortId = params => axios.get(`${SERVER.DMSCLOUD_PART}/absentDetail/item/${params}`);

// 缺料明细导出
export const exportData = params => axios.get(`${SERVER.DMSCLOUD_PART}/absentDetail/export`, {
  params,
  responseType: 'blob'
});
